package ch.usi.inf.pf2.cell;

/**
 * A Token is produced by the Recognizer and used by the Parser.
 * It represents a piece of text (a part of a formula).
 * 
 * @author Matthias.Hauswirth@unisi.ch
 */
public final class Token {

    private final TokenType type;
    private final String text;
    private final int startPosition;

    
    public Token(final TokenType type, final String text, final int startPosition) {
        this.type = type;
        this.text = text;
        this.startPosition = startPosition;
    }
    
    public TokenType getType() {
        return type;
    }
    
    public String getText() {
        return text;
    }
    
    public int getStartPosition() {
        return startPosition;
    }
    
}
